#include "mainwindow.h"
#include "ui_mainwindow.h"

#include "commthread.h"

static ComThread * comthrd = nullptr;

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    if (comthrd == nullptr) {
        comthrd = new ComThread();
        comthrd->start();
    }
}

MainWindow::~MainWindow()
{
    delete ui;
}

